#ifndef PROXY_IPIPNET_MANAGER_H_
#define PROXY_IPIPNET_MANAGER_H_

#include "proxy/base/proxybase.h"
#include <vector>

namespace proxy{

  class IpipnetManager : public boost::noncopyable{
  public:
    IpipnetManager();
    bool InitIpipnetManager(const std::string data_file);
    std::string Search(const std::string ip_str);
  private:
    //std::wstring Utf82Unicode(const std::string& utf8string);
    std::vector<char> ip_data_;
    unsigned int index_size_;
    char *p_ip_index_;
    char *p_ip_data_;
  };
}

#endif // PROXY_IPIPNET_MANAGER_H_